package com.thingcom.delinrobot.main.Launch.Login;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.thingcom.delinrobot.Common.Constant;
import com.thingcom.delinrobot.R;
import com.thingcom.delinrobot.base.BaseBackFragment;
import com.thingcom.delinrobot.utils.PreferencesUtil;
import com.thingcom.delinrobot.view.SimpleToolbar;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * author : YuFeng
 * e-mail : 923462992@qq.com
 * date   : 2019/12/4
 */
public class LoginFindPasswordFragment extends BaseBackFragment {

    @BindView(R.id.btn_forget_password_confirm)
    Button btnForgetPasswordConfirm;
    @BindView(R.id.toolbar_forget_password_one)
    SimpleToolbar toolbarForgetPasswordOne;
    @BindView(R.id.tv_mail_address)
    TextView tvMailAddress;

    public static LoginFindPasswordFragment newInstance() {
        Bundle args = new Bundle();
        LoginFindPasswordFragment fragment = new LoginFindPasswordFragment();
        fragment.setArguments(args);
        return fragment;
    }

    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_back_forget_password_one, container, false);
        unbinder = ButterKnife.bind(this, view);
        initToolbar(toolbarForgetPasswordOne);
        String mail = PreferencesUtil.getInstance(getContext()).getString(Constant.MAIL_NUMBER, null);
        tvMailAddress.setText(mail);
        return view;
    }

    @OnClick(R.id.btn_forget_password_confirm)
    public void onViewClicked() {

        start(LoginSendEmailFragment.newInstance());
    }



}
